//
//  TOTipCollectionViewCell.m
//  X-Tribe
//
//  Created by Miss.Ou on 16/4/3.
//  Copyright © 2016年 Miss.Ou. All rights reserved.
//

#import "TOTipCollectionViewCell.h"

@interface TOTipCollectionViewCell ()

@property(nonatomic,retain)UIImageView *iconImageView;
@property(nonatomic,retain)UILabel *titleLabel;

@end

@implementation TOTipCollectionViewCell


-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self createCell];
    }
    
    return self;
}

- (void)createCell
{
    self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, SCREEN_WIDTH/8, SCREEN_WIDTH/8)];
    self.iconImageView.backgroundColor = [UIColor yellowColor];
    self.iconImageView.image = [UIImage imageNamed:@"cycle_image3.jpg"];
    self.iconImageView.layer.masksToBounds = YES;
    self.iconImageView.layer.cornerRadius = SCREEN_WIDTH/16;
    self.iconImageView.layer.borderColor = [UIColor colorWithRed:0.98 green:0.56 blue:0.43 alpha:1].CGColor;
    self.iconImageView.layer.borderWidth = 1.5;
    [self.contentView addSubview:self.iconImageView];
    
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.iconImageView.frame.origin.x, self.iconImageView.frame.origin.y+self.iconImageView.frame.size.height, self.iconImageView.frame.size.width+10, 20*HEIGHT)];
    self.titleLabel.backgroundColor = CLEAR;
    self.titleLabel.center = CGPointMake(self.iconImageView.center.x, self.iconImageView.frame.origin.y+self.iconImageView.frame.size.height+20);
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.titleLabel];
    
    self.titleLabel.text = @"学术圈";
    self.titleLabel.font=[UIFont systemFontOfSize:14];
}

@end
